import { reactive } from "vue";

//处理各个自助机自定义配置 保持前端一致
export const ldzzj_config=reactive({
  /**诊间结算获取用户缴费列表**/
  ldzzj_zjjs_pre_pay:"/ldzjjs/pay/api/zzj/pre_pay",
  /**诊间结算获取医保结算信息 */
  ldzzj_zjjs_mi_info:"/ldzjjs/pay/api/zzj/mi_info",
  /**诊间结算扫码支付流程 */
  ldzzj_zjjs_smzf:"/ldzjjs/pay/api/zzj/smzf",

  /**物价查询药品名称 */
  wjcx_config:[
    {value:"0",name:"药品",col:[{title:'名称',dataIndex:'YYXMMC',align:"center",},{title:'规格',dataIndex:'YYXMGG',align:"center",},{title:'单位',width:140,dataIndex:'YYKFDWMC',align:"center",},{title:'单价',dataIndex:'XMDJ',align:"center"}]},
    {value:"1",name:"项目",col:[{title:'名称',dataIndex:'YYXMMC',align:"center",},{title:'单位',width:140,dataIndex:'YYKFDWMC',align:"center",},{title:'单价',dataIndex:'XMDJ',align:"center"}]},
    {value:"2",name:"材料",col:[{title:'名称',dataIndex:'YYXMMC',align:"center",},{title:'规格',dataIndex:'YYXMGG',align:"center",},{title:'单位',width:140,dataIndex:'YYKFDWMC',align:"center",},{title:'单价',dataIndex:'XMDJ',align:"center"}]},
  ],
  wjcx_pym_remark:"请输入项目或药品首字母"
});

//重写初始化配置信息
(window as any).ldzzj_config_refresh=()=>{
  //按照本地默认配置 重写变量
  Object.keys(((window as any).ldzzj_config)).forEach((key : any)=>{
    (ldzzj_config as any)[key]=(window as any).ldzzj_config[key];
  })
}

if(typeof (window as any).ldzzj_config == 'undefined' || (window as any).ldzzj_config==null){
  (window as any).ldzzj_config=ldzzj_config;
}else{
  (window as any).ldzzj_config_refresh();
}

